<template>
	<view>
		<view class="item">
			<view class="item-title">您的意见和反馈</view>
			<!-- <label class="item-title">您的意见和反馈</label> -->
			<textarea class="area" v-model="idea" maxlength="500" placeholder="     请详细描述您遇到的问题">

			</textarea>

		</view>
		<view class="submit" @click="$noMultipleClicks(formDate)">
			提交
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				idea: '',
				noClick:true
			}
		},
		onPullDownRefresh() {
			//this.getData();
			setTimeout(() => {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		methods: {
			formDate(){
				let self = this;
				if(self.idea == ''){
					uni.showToast({
						title:'请输入您的意见和反馈',
						icon: 'none',
						duration:2000
					});
					return;
				}
				 uni.showLoading({
				 	title:'提交中',
					
				 });
				 self._post('user.index/feedback',
				 {
					 content:self.idea
				 },
				 function(res){
					 if(res.code ==1){
						 uni.showModal({
						 	title:'提交成功',
							content:'感谢您对联合拉工作的关心与支持!对您反映的问题或意见建议，我们将认真研究。',
							success(res) {
								if(res.confirm){
									 self.idea = '';
								}else if(res.cancel){
									 self.idea = '';
								}
							}
						 });
						
					 }
				 })
			}
		}
	}
</script>

<style>
	.page {
		width: 100%;
		height: 100%;
		overflow: hidden;
	}

	.item {
		
		padding: 0 30rpx;
	}

	.item-title {
		padding-top: 30rpx;
		font-size: 32rpx;
		font-weight: 900;
		margin: 0rpx 20rpx 30rpx;
	}

	.area {
		width: 90%;
		margin: 0 auto;
		background-color: #F4F8FC;
		padding: 20rpx;
	}

	.submit {
		width: 96%;
		height: 80rpx;
		margin: 0 auto;
		line-height: 80rpx;
		color: #FFFFFF;
		font-size: 32rpx;
		text-align: center;
		position: absolute;
		bottom: 20rpx;
		left: 2%;
		background: linear-gradient(to right, #2554FE 10%, #5E7FFF 100%);
	}
</style>
